]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
XDND: Fix dragMonitor leak in WorkspacesDisplay
authorAdel Gadllah <adel.gadllah@gmail.com>
Sun, 13 Mar 2011 18:34:47 +0000 (19:34 +0100)
committerAdel Gadllah <adel.gadllah@gmail.com>
Mon, 14 Mar 2011 21:03:33 +0000 (22:03 +0100)
WorkspacesDisplay removes its dragMonitor in _dragEnd, but
this was never called in when a xdnd drag ended causing
dragMonitors to stack up and handling events multiple times.

Fix that by making sure that _dragEnd is called when xdnd ends.

https://bugzilla.gnome.org/show_bug.cgi?id=644642

js/ui/overview.js
js/ui/workspacesView.js

index b6c30d9bc4b8b4fc294e93dc82ca25173f1c1cc9..18f0c0f851e45de5b2c60e868d1b6dc9c5d3f26c 100644 (file)
@@ -220,6 +220,7 @@ Overview.prototype = {
         this._resetWindowSwitchTimeout();
         this._lastHoveredWindow = null;
         DND.removeMonitor(this._dragMonitor);
+        this.endItemDrag();
     },
 
     _resetWindowSwitchTimeout: function() {
index c2502ef98ad8bd89aeb8099c61dfb9b9059362d7..3f79ec8c3c2b6f144cc3d618296a949ad9a4cd82 100644 (file)
@@ -320,6 +320,9 @@ WorkspacesView.prototype = {
         Main.overview.disconnect(this._overviewShownId);
         global.window_manager.disconnect(this._switchWorkspaceNotifyId);
 
+        if (this._inDrag)
+            this._dragEnd();
+
         if (this._timeoutId) {
             Mainloop.source_remove(this._timeoutId);
             this._timeoutId = 0;